package us.icitap.commandcenter.utils;

import java.util.Locale;

import com.vaadin.data.util.converter.Converter;

public class ToUpperCaseConverter implements Converter<String, String>{

	@Override
	public String convertToModel(String value, Locale locale)
			throws com.vaadin.data.util.converter.Converter.ConversionException {
		if(value != null) return value.toUpperCase();
		else return null;
	}

	@Override
	public String convertToPresentation(String value, Locale locale)
			throws com.vaadin.data.util.converter.Converter.ConversionException {
		// TODO Auto-generated method stub
		return value;
	}

	@Override
	public Class<String> getModelType() {
		// TODO Auto-generated method stub
		return String.class;
	}

	@Override
	public Class<String> getPresentationType() {
		// TODO Auto-generated method stub
		return String.class;
	}
	

}
